package com.ruoyi.common.utils;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

@NoArgsConstructor
@Data
public class PiPService {
    private Title title;
    private Tooltip tooltip;
    private Legend legend;
    private List<Series> series;

    @NoArgsConstructor
    @Data
    public static class Title {
        private String text;
        private String subtext;
        private String left;
    }

    @NoArgsConstructor
    @Data
    public static class Tooltip {
        private String trigger;
    }

    @NoArgsConstructor
    @Data
    public static class Legend {
//        private String orient;
        private String left;
        private Integer bottom;
    }

    @NoArgsConstructor
    @Data
    public static class Series {
        private String name;
        private String type;
        private String radius;
        private List<Data> data;
        private Emphasis emphasis;

        @NoArgsConstructor
        @lombok.Data
        public static class Emphasis {
            private ItemStyle itemStyle;

            @NoArgsConstructor
            @lombok.Data
            public static class ItemStyle {
                private Integer shadowBlur;
                private Integer shadowOffsetX;
                private String shadowColor;
            }
        }

        @NoArgsConstructor
        @lombok.Data
        public static class Data {
            private BigDecimal value;
            private String name;
        }
    }
}
